1. Field
Embodiments of the invention relate to a framework for a software error inject tool.
2. Description of the Related Art
For a complex and highly resilient computerized system (e.g., one in which a majority of the functions are implemented by computer programs), it may be difficult to create conditions to naturally exercise certain code paths, such as error code paths. This creates challenges for software development and quality assurance.
A common conventional approach is to implement error inject code (including test scenario code and error injects) embedded within normal code (i.e., code that is compiled and executed). Error inject code may be described as one or more computer programs that add erroneous behavior to the normal program when they are executed. This is done to test possible error conditions. Then, depending on how safe the implementation is (i.e., how easily the error inject code could be incorrectly executed as part of the normal code, and, when the error inject code is executed by mistake, how large the damage is to the computerized system), runtime switches or conditional compiles are used to enable the error inject code. An error inject may be described as execution of the error inject code or other method that can cause the computerized system to exhibit erroneous behavior. Runtime switches may be described as inputs to the computer program to cause the computer program to execute in different paths. Conditional compiles may be described as compile time switches that cause a compiled program to execute in different paths. So, the cost of repeating and/or running a series of different error injects may be high, especially for a large computerized system. This is because it may take some time to recompile and restart such a large computerized system.
Also, for a complex error inject that involves multiple error inject points, the current conventional approach tends to make the error inject code so unique that it becomes hard to re-use the error inject code.
Also, when error inject code is embedded in normal code to do the error injects, when a different error inject or different condition is needed, the embedded error inject code needs to be modified and recompiled. This makes it more difficult to iterate through different test scenarios in the test process.
Thus, there is a need for a framework for a software error inject tool.